package LeetCode.leetcode24;

public class Review2 {
    public ListNode swapPairs(ListNode head) {
        if (head == null || head.next == null) {return head;}
        ListNode node1 = head.next;
        head.next = swapPairs(node1.next);
        node1.next = head;
        return node1;
    }
}
